package com.g2room.myuall.grap.univ.po.forum;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;


/** 聚合子论坛信息表 **/
public class Forum extends City implements Serializable{
	private static final long serialVersionUID = -935271628193975745L;
	/* 上次同步的时间，作为本次同步时间的起点 */
	private Long syncTime;
	/* 上次同步的时间，格式为yyyy-MM-dd HH:MM:SS，作为本次同步时间的起点 */
	private String syncTimeStr;
	/* 论坛名称，作为展示标识使用 */
	private String name;
	/* 论坛数据库登陆密码，经过了AES加密 */
	private String dbPwd;
	/* 论坛URL地址 */
	private String url;
	/* 是否启用：0、启用；1、停用（停用后不会同步数据） */
	private Integer isEnable;
	/* 论坛数据库登陆用户名 */
	private String dbUsername;
	/* 论坛数据库地址 */
	private String dbUrl;
	/* id */
	private Integer id;

	public String getSyncTimeStr() {
		return syncTimeStr;
	}

	public void setSyncTimeStr(String syncTimeStr) {
		//this.syncTimeStr = syncTimeStr;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getDbUrl() {
		return dbUrl;
	}

	public void setDbUrl(String dbUrl) {
		this.dbUrl = dbUrl;
	}

	public String getDbUsername() {
		return dbUsername;
	}

	public void setDbUsername(String dbUsername) {
		this.dbUsername = dbUsername;
	}

	public Integer getIsEnable() {
		return isEnable;
	}

	public void setIsEnable(Integer isEnable) {
		this.isEnable = isEnable;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getDbPwd() {
		return dbPwd;
	}

	public void setDbPwd(String dbPwd) {
		this.dbPwd = dbPwd;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getSyncTime() {
		// 转换为
		return syncTime;
	}

	public void setSyncTime(Long syncTime) {
		this.syncTime = syncTime;
		// 设置时间字符串
		this.syncTimeStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(syncTime * 1000));
	}

	@Override
	public String toString() {
		return "Forum [syncTime=" + syncTime + ", syncTimeStr=" + syncTimeStr
				+ ", name=" + name + ", dbPwd=" + dbPwd + ", url=" + url
				+ ", isEnable=" + isEnable + ", dbUsername=" + dbUsername
				+ ", dbUrl=" + dbUrl + ", id=" + id + ",province=" + this.getProvince() 
				+ ", provinceName=" + this.getProvinceName()
				+ ", city=" + this.getCity() + ", cityName=" + this.getCityName() + "]";
	}

}